#include <iostream>
#include "httplib.h"

#define SERVER_IP "118.25.144.162"
#define SERVER_PORT 8668

int main()
{
    httplib::Client cli(SERVER_IP,SERVER_PORT);
    httplib::MultipartFormData file;
    file.name = "file";
    file.filename = "上传.txt";
    file.content = "Linux for VsCode,Http File Unload!";
    file.content_type = "text/plain";

    httplib::MultipartFormDataItems items;
    items.push_back(file);

    //进行一个pos请求 返回一个result是对Response响应的智能指针
    auto res = cli.Post("/files",items);
    std::cout<<res->status<<std::endl;
    std::cout<<res->body<<std::endl;
    return 0;
}